from datetime import datetime
from elasticsearch import Elasticsearch
es = Elasticsearch()

res = es.search(index="syslog-2018.11.14", body={"query": {"match_all": {}}})
print("Got %d Hits:" % res['hits']['total'])
for hit in res['hits']['hits']:
	print(hit.get('_source')['text'])